import pandas as pd
from matplotlib import pyplot as plt

plt.style.use('fivethirtyeight')

# ages = [18, 19, 21, 25, 26, 26, 30, 32, 38, 45, 55]
bins = [30, 40, 50, 60]

data = pd.read_csv('histograms_data.csv')

plt.hist(data['Age'], edgecolor='black', log=True)

print(data['Age'].mean())

color = '#fc4f30'
plt.axvline(data['Age'].mean(), color=color, label='Age Median', linewidth=2)

plt.legend()

plt.title('Ages of Respondents')
plt.xlabel('Ages')
plt.ylabel('Total Respondents')

plt.tight_layout()
plt.show()
